<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title th:text="${questionDTO.title}">Coding社区</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <link rel="stylesheet" href="/css/bootstrap.min.css"/>
    <link rel="stylesheet" href="/css/bootstrap-theme.min.css">
    <link rel="stylesheet" href="/css/community.css">

    <script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
    <script src="/static/js/bootstrap.min.js" type="application/javascript"></script>

</head>
<body>
<div th:insert="~{navigation::nav}"></div>
<div class="container-fluid main">
    <div class="row">
        <div class="col-lg-9 col-md-12 col-sm-12 col-xs-12" style="margin: 50px">
            <!--针对不同屏幕的尺寸-->
            <h4><span th:text="${questionDTO.title}"> </span></h4>
            <span class="desc" style="color: #999999">
                 作者：<span th:text="${questionDTO.user.name}" ></span> |
                 发布时间：<span th:text="${#dates.format(questionDTO.gmtCreate,' yyyy-MM-dd hh:mm:ss')}"></span> |
                 阅读数：<span th:text="${questionDTO.viewCount}" th:default="0"></span>
            </span>
            <hr>
            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" th:text="${questionDTO.description}"></div>
            <hr class="col-lg-12 col-md-12 col-sm-12 col-xs-12">

                <a th:href="@{'/publish/' + ${questionDTO.id}}" th:if="${session.user != null }"
                   style="color: #9acfea;font-size: 13px"><!--&& session.user.id == questionDTO.creator-->
                    <!--判断是当前问题的用户才可以执行编辑功能-->
                    <span class="glyphicon glyphicon-pencil" aria-hidden="true">编辑
                    </span></a>
            </div>
        <div class="col-lg-2 col-md-12 col-sm-12 col-xs-12" style="float: right;margin-top: 25px">
            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                <h4>发起人</h4>
                <div class="media">
                    <div class="media-left">
                        <a herf="#">
                            <img class="media-object img-circle" style="width: 42px;height: 42px;"
                                 th:src="${questionDTO.user.getAvatarUrl()}">
                        </a>
                    </div>
                    <div class="media-body">
                        <div class="media-heading" style="margin-top: 10px">
                            <span th:text="${questionDTO.user.name}"></span>
                        </div>
                    </div>
                </div>
            </div>
            <hr class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                <h4>相关问题</h4>
            </div>
        </div>
    </div>

</div>
</body>
</html>